package com.kly.user.enums;

public enum UserTokenType {

    SYSTEM_TOKEN(0,"system-token"),

    GOOGLE_TOKEN(1,"google-token"),

    XIAOMI_TOKEN(2,"xiaomi-token"),

    SAMSUNG_TOKEN(3,"samsung-token"),




    ;

    private int code;

    private String name;

    public static UserTokenType getByCode(int code) {
        for (UserTokenType rt : values()) {
            if (rt.code == code) {
                return rt;
            }
        }
        return null;
    }

    UserTokenType(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


}
